home *** CD-ROM | disk | FTP | other *** search
- From: _GOYRA_@msn.com (David Byrden)
- Subject: RE: Help, C++ '&' dereferencer
- Date: 15 Mar 96 04:44:56 -0800
- References: <4i153m$pgf@bignews.shef.ac.uk>
- Message-ID: <00001a81+0000ad51@msn.com>
- Path: news.msn.com!msn.com
- Newsgroups: comp.lang.c++
- Organization: The Microsoft Network (msn.com)
-
-
- >> can anyone please simply explain to me what the & sign ( or
- 'dereferencer' I believe)
- >> is doing in the following command line where 'value' should end up
- as 1 or 0.
- >> value=((inportb(0x1B4) & 0x20)>>5);
-
-
- The ampersand is, in this context, the bitwise boolean AND operator.
- It is there to mask out bit 5. The designers of C were apparently
- awarded brownie points for assigning multiple meanings to keywords
- and operators.
-
-
- David
-
-